#include <iostream>
#include <string>

class Singleton {
public:
    Singleton(const Singleton&) = delete;
    Singleton& operator=(const Singleton&) = delete;
    static Singleton& getInstance() {
        static Singleton instance;
        return instance;
    }
    static int public_port(void) {
        return getInstance().port_;
    }
    static int public_port2(void) {
        return getInstance().get_port();
    }


private:
    Singleton(){

    }
    int get_port() {
        return port_;
    }
    int port_;
};

int main() {
    std::cout << Singleton::public_port() << std::endl;
    std::cout << Singleton::public_port2() << std::endl;
    return 0;
}

